<?php
class PlantUpgradeAction extends SzAbstractAction
{
    protected $paramTypes = array(
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
    );

    /**
     *  种子升级
     *
     * @param int $userId
     * @param int $seedId
     * @param int $isVideo
     * @return SzResponse
     */
    public function execute($userId, $seedId)
    {
        if (!GameService::get()->verifySysUnlock($userId, GameConst::FUNC_PLANT_PLANT)) {
            return $this->buildResponse(false);
        }

        $seed = PlantService::get()->seedUpgrade($userId, $seedId);
        return $this->buildResponse($seed);
    }
}